package com.pfzy.utildemo.activity.record.sdk.pcm.mp3.lame;

/**
 * https://juejin.cn/post/6844903453681008653
 * https://juejin.cn/post/6844903453550968845
 * https://www.cnblogs.com/ct2011/p/4080193.html
 */
public class SimpleLame {
    public static native void close();

    public static native int encode(short[] sArr, short[] sArr2, int i, byte[] bArr);

    public static native int flush(byte[] bArr);

    public static native void init(int i, int i2, int i3, int i4, int i5);

    static {
        System.loadLibrary("uxmp3lame");
    }

    public static void init(int inSamplerate, int outChannel, int outSamplerate, int outBitrate) {
        init(inSamplerate, outChannel, outSamplerate, outBitrate, 7);
    }
}
